package homework.day03;

import java.io.Serializable;

/**
 * 设计一个类:User
 * 里面有四个属性:String name,String pwd,String nick,int age
 * 定义get,set方法以及toString方法和构造方法
 **
 *  **/
public class User implements Serializable {
    private String name;
    private String pws;
    private String nick;
    private int age;

    @Override
    public String toString() {
        return "User{" +
                "name='" + name + '\'' +
                ", pws='" + pws + '\'' +
                ", nick='" + nick + '\'' +
                ", age='" + age + '\'' +
                '}';
    }

    public User() {
    }

    public User(String name, String pws, String nick, int age) {
        this.name = name;
        this.pws = pws;
        this.nick = nick;
        this.age = age;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getPws() {
        return pws;
    }

    public void setPws(String pws) {
        this.pws = pws;
    }

    public String getNick() {
        return nick;
    }

    public void setNick(String nick) {
        this.nick = nick;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }
}
